﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;


namespace Elegant2.Persistence
{
    class TransferObject : Elegant2.Persistence.ITransferObject
    {
       private static TransferObject instance;
       private SqlConnection connection;
       private SqlCommand command; //Statement Stmt;
       private DataSet resultSet;
    
       private TransferObject() {
           connection = new SqlConnection();
         //  Stmt = connection.createStatement();
           command = new SqlCommand();
       }

       public static TransferObject Instance
       {
          get 
          {
             if (instance == null)
             {
                 instance = new TransferObject();
             }
             return instance;
          }
       }

        //add persistence objetcts (connection, statement, resultSet, etc)

       public void connect()
       {

       }

       public SqlCommand prepareCommand(String query)
       {
           return null;
       }

       public DataSet doQuery(String query)
       {
           return null;
       }

       public int executeQuery(String query)
       {
           return 0;
       }

       public int getLastInsertedId()
       {
           return 0;
       }

       public int getRowsNumber(DataSet ds)
       {
           return 0;
       }

       public void startTransaction()
       {

       }

       public void endTransaction()
       {

       }
    }
}
